<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我的订单</title>
		<script type="text/javascript" src="../js/getPath.js" ></script>
		<link rel="stylesheet" href="../css/body.css" />
		<script type="text/javascript" src="../js/jquery-3.2.1.js" ></script>
		<link rel="stylesheet" href="../css/bootstrap.css" />
		<script type="text/javascript" src="../js/bootstrap.js" ></script>
	</head>
	<style>
		.container{
			margin-left: 200px;
			margin-top: 30px;
		}
		tr,
		th{
			text-align: center;
		}
	</style>
	<body>
		<div class="container">
			<div class="row clearfix">
				<div class="col-md-10 column">
					<table class="table table-hover table-bordered">
						<thead>
							<tr class="active">
								<th>订单编号</th>
								<th>门票编号</th>
								<th>数量</th>
								<th>订单日期</th>
								<th>用户</th>
							</tr>
						</thead>
						<tbody id="tbody">
							
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</body>
	<script>
		$(function(){
			$.ajax({
				type:'post',
				data:({
					'method':'myMessage',
				}),
				url: getPath() + '/order',
				dataType:'json',
				success:function(data){
					$(data.data).each(function(index,value){
						var tr = $('<tr class="info"></tr>');
						var orderId = $('<td>' + value.orderId + '</td>');
						var ticketId = $('<td>' + value.ticketId + '</td>');
						var ticketQty = $('<td>' + value.ticketQty + '</td>');
						var orderTime = $('<td>' + value.orderTime + '</td>');
						var userId = $('<td>' + value.userId + '</td>');
						
						tr.append(orderId);
						tr.append(ticketId);
						tr.append(ticketQty);
						tr.append(orderTime);
						tr.append(userId);
						
						$('#tbody').append(tr);
					});
				}
			});
		});
	</script>
</html>
